#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>

int main()
{
	char name[200] = {0};
	int i, j,mid;

	gets(name);
	
	mid = strlen(name);
	for (i = 0;i <= mid;i++)
	{
		if (name[i] == name[i + 1] && name[i] == ' ')
		{
			for (j = i;j <= mid;j++)
			{
				name[j ] = name[j + 1];
			}
			i--;
		}
	}
	puts(name);
	return 0;
}